home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 15
/
Amiga Plus Leser CD 15.iso
/
Tools
/
Development
/
PluginSRC_EvenMore
/
HTML2Text.e
< prev
next >
Wrap
Text File
|
2002-03-12
|
1KB
|
62 lines
/*
HTML2Text
EvenMore FileIO plugin
Author: Chris Perver
Copyright (c) 2001
*/
OPT REG=5
LIBRARY 'html2text.plugin',1,1,'Html2Text 1.13' IS em_main, em_end, em_info, em_pluginid, em_begin, em_format
MODULE 'tools/ctype', '*epo', '*converthtml'
DEF mem2, len2
PROC em_isdatatype(name)
DEF fname[256]:STRING
UpperStr(StrCopy(fname, FilePart(name)))
IF InStr(fname, '.HTM') > 0
RETURN TRUE
ELSEIF InStr(fname, '.ASP') > 0
RETURN TRUE
ELSEIF InStr(fname, '.SHTM') > 0
RETURN TRUE
ELSEIF InStr(fname, '.PHP') > 0
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDPROC
-> *** STANDARD PROCS FOR PLUGINS
PROC em_main(epo:PTR TO em_pluginobj)
-> mem2 := epo.nbuffer
mem2, len2 := convhtml(epo.buffer, 0, epo.length, epo.nbuffer, epo.nlength)
-> epo.length := len2
epo.nlength := len2
RETURN TRUE
ENDPROC
PROC em_begin(epo:PTR TO em_pluginobj)
IF em_isdatatype(epo.filename)
RETURN "MEM", (epo.length * 2)
ELSE
FALSE
ENDIF
ENDPROC
PROC em_end() IS EMPTY
PROC em_info() IS 'HTML2Text 1.13'
PROC em_pluginid() IS "FILE"
PROC em_format() IS 'HTML'
PROC main() IS EMPTY